home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / postscript.752 < prev    next >
Text File  |  1992-02-06  |  3KB  |  56 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fmodern Ohlfs;\f2\fswiss Helvetica;}
  2. \paperw13040
  3. \paperh10800
  4. \margl120
  5. \margr120
  6. {\colortbl\red0\green0\blue0;}
  7. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 PostScript non-secure contexts\
  8. \
  9. Q:  How can I create a non-secure context in 2.0?\
  10. \
  11. A:  Under software Release 2 the operators in PostScript that modified files were deliberately disabled.  These operators are 
  12. \b file
  13. \b0 , 
  14. \b deletefile
  15. \b0 , and 
  16. \b renamefile
  17. \b0 .  These operators are disabled in the appkit when creating new PostScript contexts.  Whenever a new PostScript context is created, it is created  in a "secure" manner.  A secure context is one that cannot modify files on the UNIX file system.  All new PostScript contexts are secure by default.\
  18. \
  19. There's a way to circumvent this if you absolutely must write files from the Window Server.  You can use an appkit function to create non-secure PostScript contexts within your application.\
  20. \
  21.  
  22. \pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\f1\fs20\fc0     extern DPSContext _DPSCreateContext(const char *hostName,\
  23.         const char *serverName,\
  24.         DPSTextProc textProc,\
  25.         DPSErrorProc errorProc,\
  26.         int timeout,\
  27.         NXZone *zone);\
  28.  
  29. \f0\fs28 \
  30. The arguments are the same as those of 
  31. \b DPSCreateContextWithTimeoutFromZone()
  32. \b0 .  This routine creates a new PostScript context which allows you to modify files on the file system.\
  33. \
  34. Developers should understand the security implications of creating these contexts:  PostScript code executed in a non-secure context can write into a user's files.   Again, writing files from the Window Server is not a preferred way for application writers to communicate information back from the Window Server to their application.\
  35.  
  36. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600 \
  37. This functionality is provided primarily for those developers who have code that already relies on these PostScript operators.\
  38.  
  39. \fc0 \
  40. A new version of the 
  41. \b pft
  42. \b0  program is available from NeXT Developer Support.  The new 
  43. \b pft
  44. \b0  allows PostScript programs and programmers to use file operators.   It is not intended as a workaround for applications or application users.   Application writers should use 
  45. \b _DPSCreateContext()
  46. \b0 .  Application users need to get a new copy of the application which uses 
  47. \b _DPSCreateContext()
  48. \b0 .\
  49. \
  50. QA752\
  51. \
  52. Not Valid for 1.0\
  53. Valid for 2.0\
  54. \
  55.  
  56.